﻿using System.Web.Mvc;
using ThirdPrize.Filters;

namespace ThirdPrize.Controllers
{
    [InitializeSimpleMembership]
    public class HomeController : Controller
    {
        private static readonly log4net.ILog log = log4net.LogManager.GetLogger("Application");

        public ActionResult Index()
        {
            log.Info("Index Visited");

            ViewBag.Message = "Nice of you to drop by.";

            return View();
        }

        public ActionResult Art()
        {
            log.Info("Art Visited");

            ViewBag.Message = "By me.";

            return View();
        }

        public ActionResult Apps()
        {
            log.Info("Apps Visited");

            ViewBag.Message = "I have written";

            return RedirectToAction("Index","Apps");
        }

        public ActionResult Blogs()
        {
            log.Info("Blogs Visited");

            ViewBag.Message = "Back when it was fashionable";

            return View();
        }

        public ActionResult About()
        {
            log.Info("About Visited");

            ViewBag.Message = "Who I am and why you should care.";

            return View();
        }

        public ActionResult Contact()
        {
            log.Info("Contact Visited");

            ViewBag.Message = "Talk to me.";

            return View();
        }
    }
}